#ifndef CONNECTION_H
#define CONNECTION_H


#include <QUrl>
#include <QHttp>
#include <QObject>
#include <QString>

class Connection :	public QObject	
{
	Q_OBJECT
	
	public:
		Connection();
		
		Q_PROPERTY( QString _userName READ getUserName WRITE setUserName )
		Q_PROPERTY( QString _passWord READ getPassWord WRITE setPassWord )
		Q_PROPERTY( QString _apiBaseUrl READ getApiBaseUrl WRITE setApiBaseUrl )
		
		QString getUserName( ) const;
		QString getPassWord( ) const;
		QString getApiBaseUrl( ) const;
		
		void setUserName( QString userName );
		void setPassWord( QString passWord );
		void setApiBaseUrl( QString apiBaseUrl );
	
	public slots:
		void getRawRequest( QString relativeUrl );	
		
	private:
		QString _userName;
		QString _passWord;
		QString _apiBaseUrl;
		int connectionId;
		QHttp *http;
};
#endif
